package com.axjy.controller;

import java.io.UnsupportedEncodingException;
import java.util.List;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.axjy.pojo.Medicine;
import com.axjy.service.MedicineService;
import com.axjy.util.Pager;

@RestController
@RequestMapping("/Medicine")
public class MedicineController {
	
	Logger logger=Logger.getLogger(this.getClass());
	
	@Resource
	private MedicineService medicineService;
	
	@RequestMapping("/list")
    public List<Medicine> list(){
        return medicineService.list();
    }
	
	/*@RequestMapping("/searchByMedicine")
	public Medicine searchByMedicine(String id) { return medicineService.searchByyaoInfo(id);}
	
	@RequestMapping("/searchPager")
	public Pager<Medicine> searchPager(Medicine medicine) throws UnsupportedEncodingException {
		System.out.println(medicine);
		Pager<Medicine> pager = new Pager<>();
		pager.setCondition(medicine);
		return medicineService.searchHospitalPager(pager);
		
	}*/
	
	
}
